home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Tools / Preditor 2.0 / Macros / Header < prev    next >
Encoding:
Text File  |  1991-07-22  |  1.1 KB  |  55 lines  |  [TEXT/TCEd]

  1. #
  2. #    Header
  3. #
  4. #    Last Modified: Friday, June 27, 1991 at 11:46 PM
  5. #    Macro Files for Preditor
  6. #
  7. #    Insert a "Template Header" for a:
  8. #        C source file     -    Header("source")
  9. #        C function        -    Header("func")
  10. #
  11. #    You can modify the file 'Template Header' to create header
  12. #    information in the format you like.
  13. #
  14. #    © Copyright Evatac Software  1988-1991
  15. #    All rights reserved
  16. #
  17.  
  18. CurrentActive = ~Active
  19.  
  20. Open(~Preditor + ":Macros:Template Header", "r")
  21. Select(∞, "Template Header")
  22.  
  23. If (~1 == "source")
  24.     Copy(«13:•, "Template Header")
  25. Else
  26.     Copy(«12:∞, "Template Header")
  27. End
  28. Close("y", "Template Header")
  29.  
  30. Activate("", CurrentActive)
  31. If (~1 == "source")
  32.     Select(•, ~Active)
  33. Else
  34.     Select([§]≥0, ~Active)
  35. End
  36.  
  37. Mark("y", §, "_xx_", ~Active)
  38. Paste(§, ~Active)
  39. Select([@"_xx_"]≤0, ~Active)
  40.  
  41. If (~1 == "source")
  42.     Search("", "<filename>", NULL, ~Active)
  43.     Insert(~Active, §, ~Active)
  44.     
  45.     Search("", "<your name>", NULL, ~Active)
  46.     Insert(~User, §, ~Active)
  47.     
  48.     Search("", "<create date>", NULL, ~Active)
  49.     Insert(Date("m", 3, ~Active), §, ~Active)
  50. Else
  51.     Select([@"_xx_"]≥0, ~Active)
  52. End
  53.  
  54. Unmark("", "_xx_", ~Active)
  55.